﻿@using Microsoft.AspNetCore.Hosting
@{
    var theme = themeService.GetCurrentTheme();
}
@inject IThemeService themeService
@inject IHostingEnvironment hostingEnvironment
<!DOCTYPE html>
<!--[if lt IE 7 ]><html class="ie ie6" lang="zh"> <![endif]-->
<!--[if IE 7 ]><html class="ie ie7" lang="zh"> <![endif]-->
<!--[if IE 8 ]><html class="ie ie8" lang="zh"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!-->
<html class="not-ie" lang="zh">
<!--<![endif]-->
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>@ViewBag.Title</title>
    <link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />
    <meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=no,maximum-scale=1.0" />
    @if (theme != null)
    {
        if (hostingEnvironment.IsDevelopment())
        {
            <link type="text/css" async rel="stylesheet" href="@Url.Content(theme.UrlDebugger)" />
        }
        else
        {
            <link type="text/css" async rel="stylesheet" href="@Url.Content(theme.Url)" />
        }
    }
    @StyleAtHead()
    @ScriptAtHead()
</head>
<body>
    <div id="container" class="container">
        @RenderBody()
    </div>
    @StyleAtFoot()
    @ScriptAtFoot()
</body>
</html>